﻿using System;
using System.Collections.Generic;

namespace Freedom.Common.Collections
{
    /// <summary>
    /// The interface that collection surpport filter
    /// </summary>
    public interface IFilter<T> where T : struct, IComparable, IConvertible, IFormattable
    {
        /// <summary>
        /// clear filter conditions
        /// </summary>
        void ClearFilterConditions();

        /// <summary>
        /// set a new filter conditions
        /// </summary>
        /// <param name="newConditions"></param>
        void SetFilterConditions(List<ConditionPara<T>> newConditions);

        /// <summary>
        /// add a filter condtiion
        /// </summary>
        /// <param name="para">conditon detail</param>
        void AddFilterCondition(ConditionPara<T> para);

    }
}
